export default function debounce(fn, wait) {
    let timeout = null
    return function() {
        clearTimeout(timeout)
        let context = this
        let args = [...arguments]
        timeout = setTimeout(function(){
                fn.apply(context, args)
            }, wait)
    }
}